const Base = require('./base.js');
module.exports = class extends Base {

	async customMenus(custom_menus) {
		let customMenus = [];
		let menus = [];
		if(!think.isEmpty(custom_menus)){
			menus = await this.where({
			id: ['IN', custom_menus]
		}).select();
		}
		

		if(menus.length > 0) {
			menus.forEach((obj) => {
				let menu = {};
				menu.id = obj.id;
				menu.name = obj.name;
				menu.url = obj.url;
				menu.target = obj.target;
				customMenus.push(menu);
			});
		}
		return customMenus;
	}

};